<template>
  <div
    :class="{
      [prefixedCls]: true,
      wide: wide,
    }"
  >
    <div :class="childClassNames">
      <slot />
    </div>
  </div>
</template>

<script lang="ts" setup>
import { computed, toRefs } from 'vue';
import { useProProvider } from '@/components/base-layouts/pro-provider';

const props = defineProps({
  contentWidth: {
    type: String,
    default: 'Fluid',
  },
  prefixCls: {
    type: String,
    default: 'ant-pro',
  },
});

const { getPrefixCls, contentWidth: contentWidthRef } = toRefs(useProProvider());
const prefixedCls = computed(() => props.prefixCls || getPrefixCls.value('grid-content'));
const wide = computed(() => (props.contentWidth || contentWidthRef.value) === 'Fixed');
const childClassNames = computed(() => `${prefixedCls.value}-children`);
</script>

<style lang="less">
#app-body {
  @import url('./index.less');
}
</style>
